<!DOCTYPE html>
<html lang="en" xmlns:th="http://www.w3.org/1999/xhtml">
<head>
    <title>Title</title>
    <script type="text/javascript" src="/js/jquery-2.1.1.min.js"></script>
    <script type="text/javascript">
        function getTree() {
            var tree = ""
            $.ajax({
                url: "/menu/getInfo",
                type: "post",
                dataType: "json",
                async: false,
                success: function (data) {
                    tree = data
                },error:function (data) {
                    alert("异常")
                }
            })

            return tree;
        }
        $(function () {
            $("#tree").treeview({
                data: getTree(),
                showCheckbox: true
            });
            $("#tree").on("nodeSelected",function (event,data) {
                $.addtabs.add({
                    id : data.id,
                    title:data.text,
                    url:data.url
                })
            })
        })

    </script>

    <style>
        .iframeClass{
            height: 800px !important;
        }
    </style>

</head>

<body>
<div th:insert="/commen/commen.html"></div>

<div class="container-fluid">
    <div class="row">
        <div class="col-md-2">
            <div id="tree"></div>
        </div>
        <div class="col-md-10">
            <div class="tabbable">
                <ul class="nav nav-tabs"></ul>
                <div class="tab-content"></div>
            </div>

        </div>
    </div>
</div>
<a href="/user/deleteLogin">退出登录</a>
</body>
</html>